{extend name="layout/layout" /}
{block name="pagecss"}
<link href="__STATIC__/plugins/bootstrap-datepicker/css/bootstrap-datepicker3.min.css" rel="stylesheet" type="text/css" />
<link href="__STATIC__/plugins/ueditor/ueditor.css" rel="stylesheet" type="text/css" />
<style>

    #upload-image img {
        width: 100px;
        height: 100px;
        cursor: pointer;
        border: 1px solid #ccc;
    }
    #edui1_imagescale{display:none !important;}  /*点击上传的图片后出现的拉伸边框*/
    .edui-editor-bottomContainer{display: none;}

</style>
{/block}

{block name="content"}
<div class="row">
    <div class="col-md-12">
        <div class="portlet light">
            <div class="portlet-title">
                <div class="caption">
                    <i class="icon-share font-dark"></i>
                    <span class="caption-subject font-dark bold uppercase"> 修改拆迁上报</span>
                </div>
                <div class="actions">
                    <a class="btn btn-circle btn-icon-only btn-default fullscreen" href="javascript:;" data-original-title="" title=""> </a>
                </div>
            </div>
            <div class="portlet-body">
                <form action="{:url('admin/'.strtolower($model).'/editPost')}" class="form-horizontal" method="post" enctype="multipart/form-data">
                    <div class="form-body">
                        <div class="row">
                            <div class="col-md-9">
                                <div class="form-group">
                                    <label class="control-label col-md-3">
                                        拆迁户
                                        <span class="required">*</span>
                                    </label>
                                    <div class="col-md-3">
                                        <input type="text" class="form-control input-large" id="households" data-required="1" name="households" maxlength="80" disabled="disabled" value="{$info.households}">
                                    </div>
                                </div>
                            </div>
                        </div>
                        <div class="row">
                            <div class="col-md-9">
                                <div class="form-group">
                                    <label class="control-label col-md-3">
                                        详细地址<span class="required">*</span>
                                    </label>
                                    <div class="col-md-9">
                                        <input type="text" id="address" value="{$info.address|default=''}" class="form-control input-large margin-bottom" name="address" disabled="disabled" placeholder="请输入详细地址，请带上省市">
                                        <input type="text" id="add-text1" style="display:none" value="{$info.addressGeo}" disabled="disabled" class="form-control input-large" name="addressGeo">
                                        <br />
                                        <div style="width:100%;height:300px;" id="map_container"></div>
                                    </div>
                                </div>
                            </div>
                        </div>

                        <div class="row">
                            <div class="col-md-9">
                                <div class="form-group">
                                    <label class="control-label col-md-3">
                                        图片
                                    </label>
                                    <div class="col-md-9">
                                        <div id="cover-image">
                                            {foreach name="imagesList" item="images"}
                                                <span class="multi-image">
                                                    <input type="hidden" name="imgIds" value="{$images.id}">
                                                    <input type="hidden" name="imgUrl" value="{$images.imgUrl}">
                                                    <img class="exist-image" src="{$images.imgUrl}" alt="">
                                                    <img class="del" src="__STATIC__/pages/image/del.png" alt="">
                                                </span>
                                            {/foreach}
                                            <span id="upload-cover-btn" data-multi="true" data-field="imgUrls">
                                                <!--<input type="hidden" class="form-control" id="imgUrl" data-required="1" name="imgUrl" value="">-->
                                                <img src="__STATIC__/admin/img/default.png" alt="图片上传" style="width: 100px;height: 100px;" />
                                            </span>
                                        </div>
                                        <span class="help-block"> (建议尺寸：750*457) </span>
                                    </div>
                                </div>
                            </div>
                        </div>

                        <!--<div class="row">
                            <div class="col-md-9">
                                <div class="form-group">
                                    <label class="control-label col-md-3">
                                        拆迁进度
                                    </label>
                                    <div class="col-md-9">
                                        <div id="resume-group">
                                            {foreach name="info.scheduleList" item="schedule"}
                                            <div class="resume-div">
                                                <div class="row" style="margin-top: 20px;">
                                                    <div class="col-md-4">
                                                        <input type="text" class="form-control reportDate" name="reportDate" value="{$schedule.reportDate}" placeholder="选择时间" autocomplete="off" readonly>
                                                    </div>

                                                </div>
                                                <div class="row">
                                                    <div class="col-md-12">
                                                        <label class="control-label"></label>
                                                        <textarea class="form-control" cols="80" rows="5" name="introduction" placeholder="请输入详情">{$schedule.content}</textarea>
                                                    </div>
                                                </div>
                                            </div>
                                            {/foreach}
                                            {empty name="info.scheduleList"}
                                            <div class="resume-div">
                                                <div class="row">

                                                    <div class="col-md-4">
                                                        <input type="text" class="form-control reportDate" name="reportDate" value="" placeholder="选择时间" autocomplete="off" readonly>
                                                    </div>

                                                </div>
                                                <div class="row">
                                                    <div class="col-md-12">
                                                        <label class="control-label"></label>
                                                        <textarea class="form-control" cols="80" rows="5" name="introduction" placeholder="请输入详情"></textarea>
                                                    </div>
                                                </div>
                                            </div>
                                            {/empty}
                                        </div>
                                        <button type="button" class="btn btn-success addResume-btn" style="margin-top: 10px;">
                                            <i class="fa fa-plus"></i> 添加进度
                                        </button>
                                    </div>
                                </div>
                            </div>
                        </div>-->

                        <input type="hidden" value="{$info.id}" name="editID">
                        <hr />
                        <div class="row">
                            <div class="form-actions">
                                <div class="col-md-offset-2 col-md-10">
                                    <button type="button" id="form-submit" class="btn blue save-btn">
                                        保存 <i class="fa fa-floppy-o"></i>
                                    </button>
                                    <button type="button" class="btn default" onclick="history.go(-1);">
                                        返回 <i class="fa fa-mail-forward"></i>
                                    </button>
                                </div>
                            </div>
                        </div>
                    </div>
                </form>
            </div>
        </div>
    </div>
</div>

<input type="hidden" class="token_url" value="{:url('admin/Image/token')}">
<input type="hidden" class="record_url" value="{:url('admin/Image/record')}">
<input type="hidden" class="delimage_url" value="{:url('admin/Image/delete')}">
{/block}

{block name="pagescript"}
<script src="__STATIC__/plugins/bootstrap-datepicker/js/bootstrap-datepicker.js" type="text/javascript"></script>

<script type="text/javascript" src="__STATIC__/plugins/ueditor/ueditor.config.js"></script>
<script type="text/javascript" src="__STATIC__/plugins/ueditor/ueditor.all.js"></script>
<script src="__STATIC__/admin/js/qiniu/plupload.full.min.js" type="text/javascript"></script>
<script src="__STATIC__/admin/js/qiniu/qiniu.js" type="text/javascript"></script>
<script src="__STATIC__/admin/js/qiniu/custom.js" type="text/javascript"></script>
<script src="__STATIC__/admin/js/qiniu/qiniuConfig.js" type="text/javascript"></script>
<script src="__STATIC__/admin/pages/js/ueditor.js" type="text/javascript"></script>
<script src="__STATIC__/admin/pages/js/uploadfile.js" type="text/javascript"></script>
<script src="https://api.map.baidu.com/api?v=2.0&ak=07E2669c3b77a0793274952ba61cd8b8&s=1" type="text/javascript"></script>
<script src="__STATIC__/admin/pages/js/dismantlement.js" type="text/javascript"></script>
<script>
    var areaurl = "{:url('admin/layer/getCounty')}";
</script>
<script type="text/javascript">

//    var ue = new UE.ui.Editor({} );
//
//    var longtext = $('#longtext').find('script');
//    longtext.each(function(){
//        var name = $(this).attr('name');
//        ue.render( name );
//    });


</script>
{/block}